const userInfoList = [
  {
    compId: 2023050401,
    userId: 2,
    roleId: 2,
    userNo: 'cst_lyr',
    userName: '测试01',
    userPwd: null,
    userPhone: '18814249190',
    userState: true,
    accesstoken: null,
    pwdUpdDates: 0,
    roleName: '系统管理员',
    userType: null,
    compName: '中山市创思特智能'
  },
  {
    compId: 2023050401,
    userId: 3,
    roleId: 2,
    userNo: 'cst_hm01',
    userName: '测试何明修改',
    userPwd: null,
    userPhone: '18814249199',
    userState: true,
    accesstoken: null,
    pwdUpdDates: 0,
    roleName: '系统管理员',
    userType: null,
    compName: '中山市创思特智能'
  }
]

export default [
  // 查询用户列表
  {
    url: '/dev-api/user/getUserInfoList',
    type: 'get',
    response: (_) => {
      return {
        code: 200,
        data: userInfoList,
        total: userInfoList.length,
        message: 'success'
      }
    }
  },

  // 查询角色列表
  {
    url: '/dev-api/role/getRoleInfoList',
    type: 'get',
    response: (_) => {
      return {
        code: 200,
        data: roleInfoList,
        total: roleInfoList.length,
        message: 'success'
      }
    }
  },

  // 根据角色ID查询菜单权限
  {
    url: '/dev-api/role/roleMenuRight',
    type: 'get',
    response: (config) => {
      if (!config.body) {
        return {
          code: 50008,
          message: 'Login failed, unable to get roleMenuRight.'
        }
      } else {
        return {
          code: 200,
          data: roleMenuRight
        }
      }
    }
  }
]
